package com.ps.actions.setting;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.ps.actions.BaseAction;

import com.ps.service.setting.FunctionModuleService;

@SuppressWarnings("serial")
public class FunctionModuleAction extends BaseAction {
	private static final Logger log = LoggerFactory
		.getLogger(FunctionModuleAction.class);
	
	@Autowired
	private FunctionModuleService functionModuleService;

	private Integer roleId;
	
	public String getXmlTree() {
		String content = functionModuleService.findAll2XmlTree();
        
		outputXml(content);
		return null;
	}
	
	public String getXmlTreeCheckByRoleId() {
		String content = functionModuleService.findAllByRoleId2XmlTree(getRoleId());
        
		outputXml(content);
		return null;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public Integer getRoleId() {
		return roleId;
	}
	
	
	
}
